package com.example.httppost;

import java.util.HashMap;
import java.util.Map;

import org.apache.http.client.HttpClient;

/**
 * Created by 陈宇瀚  on 2015/6/28.
 */
public class DemoHttpSend {
	public void HttpSend(String user,String password) {
		HttpClient client = new HttpUtils().makeHttpClient();
		// 制作URL
		String url = "http://192.168.1.107:8080/teachinglite/user/login";

		// 制作Post参数
		Map<String, String> DemoUserMap = new HashMap<String, String>();
		DemoUserMap.put("number", user);
		DemoUserMap.put("password", password);
		// 发送Post请求
		String result=HttpUtils.post(client, url, DemoUserMap);
		System.out.println(result);
	}
}
